﻿using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using BusinessLayer;

namespace AddCars
{
    class Program
    {
        static void Main(string[] args)
        {


            Car c1 = Car.Repository.Create();
            c1.Name = "car1";
            c1.CarNumber = "11-22-33";
            c1.Enabled = true;
            c1.Save();

            Car c2 = Car.Repository.Create();
            c2.Name = "car2";
            c2.CarNumber = "21-35-66";
            c2.Enabled = true;
            c2.Save();

            Car c3 = Car.Repository.Create();
            c3.Name = "car3";
            c3.CarNumber = "18-99-24";
            c3.Enabled = true;
            c3.Save();

            Driver d1 = Driver.Repository.Create();
            d1.Name = "Poxos";
            d1.Surname = "Poxosyan";
            d1.PhoneNumber = "093-10-10-10";
            d1.Email = "poxosyan@mail.ru";
            d1.Save();


            Driver d2 = Driver.Repository.Create();
            d2.Name = "Petros";
            d2.Surname = "Petrosyan";
            d2.PhoneNumber = "093-20-20-20";
            d2.Email = "petrosyan@mail.ru";
            d2.Save();

            Driver d3 = Driver.Repository.Create();
            d3.Name = "Robert";
            d3.Surname = "Sargsyan";
            d3.PhoneNumber = "094-17-05-59";
            d3.Email = "robsargarm@mail.ru";
            d3.Save();

            Car.Repository.SetDriver(c1.Id, d1.Id, new DateTime(2014, 5, 10, 12, 0, 0), DateTime.Now);
            Car.Repository.SetDriver(c2.Id, d2.Id, new DateTime(2014, 5, 10, 12, 0, 0), DateTime.Now);
            Car.Repository.SetDriver(c3.Id, d3.Id, new DateTime(2014, 5, 10, 12, 0, 0), DateTime.Now);

            Console.Read();
        }
    }
}
